package com.xinqi.modules.chat.chat.group.convert;

import com.xinqi.common.mapstruct.CommonConvertConfig;
import com.xinqi.modules.chat.chat.group.domain.ChatGroupUserEntity;
import com.xinqi.modules.chat.chat.group.dto.req.ChatGroupUserCreateDTO;
import com.xinqi.modules.chat.chat.group.dto.req.ChatGroupUserUpdateDTO;
import com.xinqi.modules.chat.chat.group.dto.rsp.ChatGroupUserResultDTO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

/**
 * 群组成员表转换
 *
 * @author: system
 * @date: 2023/01/12
 */
@Mapper(config = CommonConvertConfig.class)
public abstract class ChatGroupUserConvert {
    public abstract ChatGroupUserEntity create(ChatGroupUserCreateDTO s);

    public abstract ChatGroupUserEntity update(ChatGroupUserUpdateDTO s, @MappingTarget ChatGroupUserEntity t);

    public abstract ChatGroupUserEntity update(ChatGroupUserUpdateDTO s);

    public abstract ChatGroupUserEntity newEntity(ChatGroupUserEntity s);

    public abstract ChatGroupUserResultDTO convert(ChatGroupUserEntity s);

}
